﻿// <copyright file="IPlainLiteral.cs" company="Alan Dean">
// The MIT License

// Copyright (c) 2008 Alan Dean

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// </copyright>
// <author>Alan Dean</author>
// <email>alan.dean@thoughtpad.net</email>

namespace Semantic.Rdf
{
    using System;
    using System.Globalization;

    /// <summary>Defines the RDF Plain Literal interface.</summary>
    /// 
    /// <remarks>
    /// A node may be a URI with optional fragment identifier (URI reference, or URIref), a literal,
    /// or blank (having no separate form of identification). Properties are URI references.
    /// </remarks>
    /// 
    /// <seealso href="http://www.w3.org/TR/rdf-concepts/#section-URI-Vocabulary">
    /// URI-based Vocabulary and Node Identification
    /// </seealso>
    public interface IPlainLiteral : ILiteral
    {
        #region CultureInfo Language
        /// <summary>
        /// Gets the language tag.
        /// </summary>
        /// 
        /// <value>
        /// A a language tag as defined by <see href="http://www.w3.org/TR/rdf-concepts/#ref-rfc-3066">RFC-3066</see>,
        /// normalized to lowercase.
        /// </value>
        /// 
        /// <remarks>
        /// <para>
        /// <strong>Note:</strong>
        /// Literals in which the lexical form begins with a composing character
        /// (as defined by <see href="http://www.w3.org/TR/rdf-concepts/#ref-charmod">CHARMOD</see>)
        /// are allowed however they may cause interoperability problems, particularly with
        /// <see href="http://www.w3.org/TR/rdf-concepts/#ref-xml-1-1">XML version 1.1</see>.
        /// </para>
        /// <para>
        /// <strong>Note:</strong>
        /// When using the language tag, care must be taken not to confuse language with locale.
        /// The language tag relates only to human language text.
        /// Presentational issues should be addressed in end-user applications.
        /// </para>
        /// <para>
        /// <strong>Note:</strong>
        /// The case normalization of language tags is part of the description of the abstract syntax,
        /// and consequently the abstract behaviour of RDF applications.
        /// It does not constrain an RDF implementation to actually normalize the case.
        /// Crucially, the result of comparing two language tags should not be sensitive to the case of the original input.
        /// </para>
        /// </remarks>
        CultureInfo Language
        {
            get;
        }
        #endregion
    }
}